export const feedContentTypes = [
  {
    type: 'answer',
    name: '回答',
  },
  {
    type: 'article',
    name: '文章',
  },
  {
    type: 'question',
    name: '问题',
  },
  {
    type: 'collection',
    name: '收藏夹',
  },
  {
    type: 'column',
    name: '专栏',
  },
  {
    type: 'topic',
    name: '话题',
  },
  {
    type: 'roundtable',
    name: '圆桌',
  },
  {
    type: 'pin',
    name: '想法',
  },
];

export const PRODUCT_TYPES = {
  MEMBER_ID: 1,
  // 暂不需要这些类型，后续若需要加上即可
  // IMEI_MD5: 2,
  // IDFA_MD5: 3,
  // OAID: 7,
};

export const PRODUCT_MAP = {
  1: 'MEMBER_ID',
  2: 'IMEI_MD5',
  3: 'IDFA_MD5',
  4: '手机号',
  7: 'OAID',
  8: 'oaid MD5',
  9: '用户ID的MD5',
  10: '手机号的MD5',
  11: 'IMEI',
  12: 'IDFA',
  14: 'oaid 原始值',
  15: 'oaid 原始值 MD5',
  16: '阿里联合圈选',
  17: 'MEMBER_HASH_ID',
  18: 'CLIENT_ID',
};

export const STATUS_MAP = {
  1: { label: '创建', status: 'processing' },
  2: { label: '重跑', status: 'warning' },
  3: { label: '任务提交', status: 'processing' },
  4: { label: '圈选中', status: 'processing' },
  5: { label: '圈选成功', status: 'processing' },
  6: { label: '生成文件', status: 'processing' },
  7: { label: '成功', status: 'success' },
  8: { label: '失败', status: 'error' },
  9: { label: '过期', status: 'error' },
  16: { label: '离线映射', status: 'processing' },
  17: { label: '离线标签任务', status: 'processing' },
  19: { label: '圈选初始化', status: 'processing' },
  20: { label: '圈选等待中', status: 'processing' },
};

export const UPDATE_TYPE_MAP = {
  0: '一次性任务',
  1: '按天更新',
  2: '按周更新',
  3: '按月更新',
};

export const EXPANDED_CROWD_STATUS_MAP = {
  COMMITTED: { value: 11, label: '已提交', status: 'warning' },
  PROCESSING: { value: 12, label: '生成中', status: 'processing' },
  GENERATED: { value: 13, label: '已生成', status: 'success' },
  FAILED: { value: 14, label: '生成失败', status: 'error' },
  RETRY: { value: 15, label: '重试', status: 'default' },
};

export const CROWD_TYPE = {
  1: '标签创建',
  2: '组合创建',
  3: '人群包上传',
  5: '舰桥高级筛选',
  6: '舰桥 SQL 圈人',
  7: '人群包上传',
  8: '标签创建',
  9: '行为圈人',
  10: '教育圈人',
  11: 'MCN 圈人',
};

export const REFRESH_TYPE = {
  0: '一次性任务',
  1: '按天更新',
  2: '按周更新',
  3: '按月更新',
};

export const CROWD_BUSINESS_TYPE_MAP = {
  PLATFORM: { value: 0, label: '平台' },
  BUSINESS: { value: 1, label: '商业' },
};

export const TARGET_TYPE_MAP = {
  1: '站内用户',
  2: '站外用户',
};

export const MEASURE_TYPE_MAP = {
  1: '广告有效曝光',
  2: '广告点击',
  3: '插件曝光',
  4: '插件点击',
  5: '正向互动',
  6: '文章完读',
  7: '广告有效可见曝光',
};

export const DIMENSION_TYPE_MAP = {
  campaign: '计划名称',
  ad: '单元名称',
  creative: '创意名称',
  cust: '客户名称',
  prod: '产品名称',
};

export const MEASURE_TYPE_LIST = Object.keys(MEASURE_TYPE_MAP).map((item) => ({
  label: MEASURE_TYPE_MAP[item],
  value: item,
}));

export const DIMENSION_TYPE_LIST = Object.keys(DIMENSION_TYPE_MAP).map(
  (item, index) => ({
    label: DIMENSION_TYPE_MAP[item],
    value: index + 1,
    name: item,
  }),
);

export const CONTAINS_EDU_CARDS = {
  0: '不插卡',
  1: '插卡',
};

export const BEHAVIOR = {
  10: {
    1: '浏览',
    2: '点赞',
    3: '收藏',
    4: '评论',
    5: '搜索',
    6: '关注',
    7: '完读',
  },
  11: {
    1: '槽位有效曝光',
    2: '槽位有效点击',
    3: '私信有效曝光',
    4: '私信有效点击',
    5: '搜索有效曝光',
    6: '搜索有效点击',
    7: '运营push有效曝光',
    8: '运营push有效点击',
  },
};
